import request from '@/utils/request'
// 获取权限点列表
export const getPermissionAPI = () => {
  return request({
    url: '/sys/permission',
    method: 'get'
  })
}
// 新增权限
export const addPermissionAPI = (perForm) => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data: perForm
  })
}
// 显示编辑权限弹框详情
export const showPermissionAPI = (id) => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'get'
  })
}
// 编辑权限弹框
export const editPermissionAPI = (perForm) => {
  return request({
    url: `/sys/permission/${perForm.id}`,
    method: 'put',
    data: perForm
  })
}
// 删除权限点
export const delPermissionAPI = (id) => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
